package com.fh.service.impl;

import com.fh.mapper.UserMapper;

import com.fh.model.Users;
import com.fh.service.UserService;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {
@Resource
   private UserMapper userMapper;


    @Override
    public Users queryUser(String username) {
        Example example = new Example(Users.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("username",username);
       Users user = userMapper.selectOneByExample(example);
        return user;
    }
}
